package com.linzm.j2eetype.servicelocator07;

import com.linzm.j2eetype.servicelocator07.service.Service;

/**
 * @Author zimingl
 * @Date 2023/4/16 16:42
 * @Description: ServiceLocatorPatternDemo
 */
public class ServiceLocatorPatternDemo {
    public static void main(String[] args) {
        Service service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
        service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
    }
}
